<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@page import="com.AAL.Model.TypeOfAuto"%>
<%@page import="java.util.List"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>


<h3
	style="background-color: #8AC0E9; font-size: 17px; width: 95%; padding: 10px; color: white;">Quản
lý danh mục sản phẩm</h3>
<s:url id="productViewAdd" value="/productViewAdd" />
<sj:a title="Thêm mới sản phẩm" id="lnkproductViewAdd"
	href="%{productViewAdd}" targets="container" button="true"
	buttonIcon="new" cssStyle="float:right; margin-right:35px;">
	Thêm mới 
</sj:a>

<br />
<p style="clear: both;"></p>
<div style="margin: 10px;"><s:form id="form" method="post"
	 theme="simple" cssClass="yform">
	<fieldset style="width: 95%;"><legend
		style="margin-left: 10px; font-weight: bold;">Tìm kiếm lốp</legend>
	<div class="type-text">
	<ul class="form">
		<li class="left">Mã lốp:</li>
		<li class="right"><s:textfield cssClass="smallInput wide"
			name="wheelDetail.wheelDetailID" /></li>
		<li class="clr"></li>
		<li class="left">Nhóm Lốp:</li>
		<li class="right"><s:select list="lstTypesOfWheels"
			listKey="typeOfWheelID" listValue="productName"
			cssClass="smallInput wide" headerKey="0" headerValue="--Chọn nhóm lốp--"
			name="wheelDetail.typesOfWheel.typeOfWheelID" /></li>
		<li class="clr"></li>
		<li class="left">Dòng xe:</li>
		<li class="right"><s:select list="lstTypeOfAutos"
			listKey="typeOfAutoID" listValue="typeOfAutoName" headerKey="0" headerValue="--Chọn dòng xe--"
			cssClass="smallInput wide" name="wheelDetail.typesOfWheel.typeOfAuto.typeOfAutoID" /></li>
		<li class="clr"></li>
		<li class="left">&nbsp;</li>
		<li class="right"><s:url id="searchProductW" value="/searchProductW" /> <sj:submit
			title="Tìm kiếm" id="lnksearchProductW" href="%{searchProductW}"
			button="true" value="Tìm kiếm" targets="container" class="link"></sj:submit></li>
		<li class="clr"></li>
	</ul>

	</div>

	</fieldset>
</s:form></div>

<div style="margin: 10px;">
<fieldset style="width: 95%;"><legend
	style="margin-left: 10px; font-weight: bold;">Danh sách sản
phẩm</legend>
<div class="type-text">

<table width="99%" cellpadding="0" cellspacing="0" id="box-table-a"
	summary="Employee Pay Sheet">
	<thead>
		<tr>
			<th width="20%" scope="col">STT</th>
			<th width="30%" scope="col">Mã sp</th>
			<th width="20%" scope="col">Nhóm lốp</th>
			<th width="10%" scope="col">Nhóm xe</th>
			<th width="10%" scope="col"></th>
			<th width="10%" scope="col"></th>
		</tr>
	</thead>
	<tbody>
		<%
			int stt = 1;
		%>
		<s:iterator value="listWheelDetails">
			<tr>
				<td width="20%" scope="col"><%=stt++%></td>
				<td width="30%" scope="col"><s:property value="wheelDetailID" /></td>
				<td width="20%" scope="col"><s:property
					value="typesOfWheel.productName" /></td>
				<td width="20%" scope="col"><s:property
					value="typesOfWheel.typeOfAuto.typeOfAutoName" /></td>
				<td width="10%" scope="col"><s:url id="productViewDetail"
					value="/productViewDetail?id=%{wheelDetailID}" /> <sj:a
					title="Thông tin chi tiết" href="%{productViewDetail}"
					targets="container" class="link"> Xem chi tiết
            </sj:a></td>
				<td width="10%" scope="col"><s:url id="productViewEdit"
					value="/productViewEdit?id=%{wheelDetailID}" /> <sj:a title="Sua"
					href="%{productViewEdit}" targets="container" class="link"> Sửa
            </sj:a></td>
			</tr>


			<tr></tr>
			<tr class="footer">

			</tr>
		</s:iterator>
	</tbody>
</table>
</div>

</fieldset>
</div>
